Class EPolicyException

All Implemented Interfaces:
Serializable

public class EPolicyException extends EBaseException
This class represents Exceptions used by the policy package. The policies themselves do not raise exceptions but use them to format error messages. Adapted from EBasException

 NOTE:  The Policy Framework has been replaced by the Profile Framework.
 

Version:
$Revision$, $Date$
See Also:
  • Constructor Details

    • EPolicyException

      public EPolicyException(String msgFormat)
      Constructs a base exception.

      Parameters:
      msgFormat - exception details
    • EPolicyException

      public EPolicyException(String msgFormat, String param)
      Constructs a base exception with a parameter. For example,
       new EPolicyException("failed to load {0}", fileName);
       

      Parameters:
      msgFormat - exception details in message string format
      param - message string parameter
    • EPolicyException

      public EPolicyException(String msgFormat, String param1, String param2)
      Constructs a base exception with two String parameters. For example,

      Parameters:
      msgFormat - exception details in message string format
      param1 - message string parameter
      param2 - message string parameter
    • EPolicyException

      public EPolicyException(String msgFormat, Exception param)
      Constructs a base exception. It can be used to carry a system exception that may contain information about the context. For example,
                      try {
                      ...
                      } catch (IOExeption e) {
                              throw new EPolicyException("Encountered System Error {0}", e);
            }
       

      Parameters:
      msgFormat - exception details in message string format
      param - system exception
    • EPolicyException

      public EPolicyException(String msgFormat, Object[] params)
      Constructs a base exception with a list of parameters that will be substituted into the message format.

      Parameters:
      msgFormat - exception details in message string format
      params - list of message format parameters
  • Method Details

    • getParameters

      public Object[] getParameters()
      Returns a list of parameters.

      Overrides:
      getParameters in class EBaseException
      Returns:
      list of message format parameters
    • toString

      public String toString()
      Returns localized exception string. This method should only be called if a localized string is necessary.

      Overrides:
      toString in class EBaseException
      Returns:
      details message
    • toString

      public String toString(Locale locale)
      Returns the string based on the given locale.

      Overrides:
      toString in class EBaseException
      Parameters:
      locale - locale
      Returns:
      details message
    • getBundleName

      protected String getBundleName()
      Description copied from class: EBaseException
      Returns the given resource bundle name.
      Overrides:
      getBundleName in class EBaseException
      Returns:
      the name of the resource bundle for this class.